package com.cykj.controller;


import com.cykj.dto.ResponseDTO;
import com.cykj.service.IUserService;
import com.cykj.vo.UserVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/user")
public class UserController {

    @Autowired
    private IUserService userService;

    // 访问地址： 127.0.0.1:8080/jd-user-service/user/login
    @PostMapping("/login")
    public ResponseDTO login(@RequestBody UserVO userVO) {
        return userService.login(userVO);
    }
    @PostMapping("/register")
    public ResponseDTO register(@RequestBody UserVO userVO) {
        return userService.register(userVO);
    }

}

